
**********************************************************************************************
*****************Replication Code for the paper "The Spillover Effect of Media Ownership on Mainstream Media Discourse"
*****************Authors: Xin Yu, Shijun Guo, Robert Faff

****************The code in this document accompanies the publication titled "The Spillover Effect of Media Ownership on Mainstream Media Discourse", published in Financial Management. Due to copyright restrictions, the original dataset cannot be shared. Instead, a pseudo-dataset is provided to facilitate users' understanding of the code. This pseudo-dataset represents only a small sample and is intended solely for illustrating the regression analysis. Company codes (ID) have been anonymized through masking.

****************Please note that the code for some of our empirical results is not included in this document, as those results are based on a different dataset. These results include columns (4)-(6) of Panel A of Table 4, Panel B and Panel C of Table 4, Panel C of Table 7, and Table 8. Since the estimations for these results use the same OLS methodology reported in this document but are applied to different datasets, the corresponding code is not provided here. Details of the code for these results are available from the authors upon request.

****************Please note that the "suest" code used in this do-file is an updated version that supports clustering in the estimation.


**********************************************************************************************
********************************************************************************
clear

********************************************************************************Input the data******
use "D:\My Dcoument\Desktop\MediaOwnershipPseudoDataset.dta"

********************************************************************************drop the missing data******
local v "lnCoverage Ownership Size Leverage BM Growth ROA Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE"
egen miss = rmiss(`v')
drop if miss

********************************************************************************gen firm and indust variable
encode ID, gen (firm)
encode Industry, gen (indust)

********************************************************************************drop single observation
bys firm: gen singleton = (_N==1)
drop if singleton==1

********************************************************************************winsor variables
winsor2 lnCoverage Sentiment1 SSentiment1 MSentiment1 Size Leverage BM Growth ROA Top Block Momentum Idiosyncratic Ind Zindex TQ CAPX Institution EST AST, replace cuts(1 99) by(Year)

********************************************************************************sumarize the data after winsor
tabstat lnCoverage Sentiment1 Sentiment2 Ownership Size Leverage BM Growth ROA Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE MP,stats(n mean sd p25 median p75) c(s) f(%9.3f)


********************************************************************************define control variables
global Controls "Size Leverage BM Growth ROA Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE MP"

********************************************************************************Part 1: Basic Regression(H1)***************************
reghdfe lnCoverage Ownership $Controls, absorb (firm Year) vce(cluster firm)
estimates store Main1

reghdfe Sentiment1 Ownership $Controls, absorb (firm Year) vce(cluster firm)
estimates store Main1

reghdfe Sentiment2 Ownership $Controls, absorb (firm Year) vce(cluster firm)
estimates store Main2

esttab Main1 Main1 Main2,star(* 0.1 ** 0.05 *** 0.01) b(%10.3f) t(%9.3f) compress nogap scalars("N" "r2_a") title("Baseline Analysis") label mtitles

********************************************************************************Part 2:Endogeneity

************************************************PSM: Matched Sample Regression and ATT*********************

psmatch2 Ownership Size Idiosyncratic STD Leverage Growth BM ROA Top Block Zindex SOE MP i.Year i.indust, outcome() neighbor (1) noreplacement

gen pair1 = _id if _treated==0

replace pair1 = _n1 if _treated==1

bysort pair1: egen paircount1 = count(pair1)

gen Reg1 = 1 if paircount1 ==2

drop _pscore _treated _support _weight _id _n1 _nn _pdif pair1 paircount1

reghdfe lnCoverage Ownership $Controls if Reg1 ==1, absorb (firm Year) vce(cluster firm)
estimates store psm1


psmatch2 Owneship_dumS Size Idiosyncratic STD Leverage Growth BM ROA Top Block Zindex SOE MP i.Year i.indust, outcome() neighbor (1) noreplacement

gen pair2 = _id if _treated==0

replace pair2 = _n1 if _treated==1

bysort pair2: egen paircount2 = count(pair2)

gen Reg2 = 1 if paircount2 ==2

drop _pscore _treated _support _weight _id _n1 _nn _pdif pair2 paircount2


reghdfe Sentiment1 Ownership $Controls if Reg2 ==1, absorb (firm Year) vce(cluster firm)
est store psm2
reghdfe Sentiment2 Ownership $Controls if Reg2 ==1, absorb (firm Year) vce(cluster firm)
est store psm3

esttab psm1 psm2 psm3,star(* 0.1 ** 0.05 *** 0.01) b(%10.3f) t(%9.3f) compress nogap scalars("N" "r2_a") title("PSM Approach") label mtitles


************************************************IV Approach*********************

reg Ownership Issue Size Leverage BM Growth ROA Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE MP i.Year i.indust, cluster (firm) first
estimates store first

ivreghdfe lnCoverage $Controls (Ownership = Issue), absorb (Year indust) cluster (firm)
estimates store CoverageIV

ivreghdfe Sentiment1 $Controls (Ownership = Issue), absorb (Year indust) cluster (firm)
estimates store SenIV1

ivreghdfe Sentiment2 $Controls (Ownership = Issue), absorb (Year indust) cluster (firm)
estimates store SenIV2

esttab first CoverageIV SenIV1 SenIV2,star(* 0.1 ** 0.05 *** 0.01) b(%10.3f) t(%9.3f) compress nogap scalars("N" "r2" "r2_a" "r2_p" "chi2_c" "F" "ll Log lik." "chi2 Chi-squared") title("IV Approach") label mtitles


********************************************************************************Part 3: Channel Test***************************

************************************************Impact of Networks(H2)

************************************************Matching

psmatch2 Slocation Size Idiosyncratic STD Leverage Growth BM ROA Top Block Zindex SOE MP i.Year i.indust, outcome() neighbor (1) noreplacement

gen pair5 = _id if _treated==0

replace pair5 = _n1 if _treated==1

bysort pair5: egen paircount5 = count(pair5)

gen LReg1 = 1 if paircount5 ==2

drop _pscore _treated _support _weight _id _n1 _nn _pdif pair5 paircount5


psmatch2 Dlocation Size Idiosyncratic STD Leverage Growth BM ROA Top Block Zindex SOE MP i.Year i.indust, outcome() neighbor (1) noreplacement

gen pair6= _id if _treated==0

replace pair6 = _n1 if _treated==1

bysort pair6: egen paircount6 = count(pair6)

gen LReg2 = 1 if paircount6 ==2

drop _pscore _treated _support _weight _id _n1 _nn _pdif pair6 paircount6


psmatch2 SlocationS Size Idiosyncratic STD Leverage Growth BM ROA Top Block Zindex SOE MP i.Year i.indust, outcome() neighbor (1) noreplacement

gen pair7 = _id if _treated==0

replace pair7 = _n1 if _treated==1

bysort pair7: egen paircount7 = count(pair7)

gen LReg3 = 1 if paircount7 ==2

drop _pscore _treated _support _weight _id _n1 _nn _pdif pair7 paircount7


psmatch2 DlocationS Size Idiosyncratic STD Leverage Growth BM ROA Top Block Zindex SOE MP i.Year i.indust, outcome() neighbor (1) noreplacement

gen pair8 = _id if _treated==0

replace pair8 = _n1 if _treated==1

bysort pair8: egen paircount8 = count(pair8)

gen LReg4 = 1 if paircount8 ==2

drop _pscore _treated _support _weight _id _n1 _nn _pdif pair8 paircount8



************************************************Matched Sample Regression

reghdfe lnCoverage Slocation $Controls if LReg1 == 1, absorb (firm Year) vce (cluster firm)
est store net1 

reghdfe lnCoverage Dlocation $Controls if LReg2 == 1, absorb (firm Year) vce (cluster firm)
est store net2

reghdfe Sentiment1 SlocationS $Controls if LReg3 == 1, absorb (firm Year) vce (cluster firm)
est store net3 

reghdfe Sentiment1 DlocationS $Controls if LReg4 == 1, absorb (firm Year) vce (cluster firm)
est store net4

reghdfe Sentiment2 SlocationS $Controls if LReg3 == 1, absorb (firm Year) vce (cluster firm)
est store net5 

reghdfe Sentiment2 DlocationS $Controls if LReg4 == 1, absorb (firm Year) vce (cluster firm)
est store net6

esttab net1 net2 net3 net4 net5 net6,star(* 0.1 ** 0.05 *** 0.01) b(%10.3f) t(%9.3f) compress nogap scalars("N" "r2_a") title("Impact of Networks") label mtitles


************************************************Coefficient comparision

xtset firm Year

xtreg lnCoverage Slocation Size Leverage BM Growth ROA Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE MP i.Year if LReg1 == 1, fe
est store ml1

xtreg lnCoverage Dlocation Size Leverage BM Growth ROA Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE MP i.Year if LReg2 == 1,fe
est store ml2

suest ml1 ml2, cluster (firm)

test [ml1_mean]Slocation=[ml2_mean]Dlocation


xtset firm Year

xtreg Sentiment1 SlocationS Size Leverage BM Growth ROA Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE MP i.Year if LReg3 == 1, fe
est store ml3 

xtreg Sentiment1 DlocationS Size Leverage BM Growth ROA Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE MP i.Year if LReg4 == 1,fe
est store ml4

suest ml3 ml4, cluster (firm)

test [ml3_mean]SlocationS=[ml4_mean]DlocationS


xtreg Sentiment2 SlocationS Size Leverage BM Growth ROA Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE MP i.Year if LReg3 == 1,fe
est store ml5 

xtreg Sentiment2 DlocationS Size Leverage BM Growth ROA Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE MP i.Year if LReg4 == 1,fe
est store ml6

suest ml5 ml6, cluster (firm)

test [ml5_mean]SlocationS=[ml6_mean]DlocationS



************************************************Similarity of Media Reports(H3)

reghdfe EST Ownership $Controls if Sentiment1 !=.,absorb(firm Year) vce(cluster firm)
estimates store Similarity1

reghdfe AST Ownership $Controls if Sentiment1 !=.,absorb(firm Year) vce(cluster firm)
estimates store Similarity2

esttab Similarity1 Similarity2,star(* 0.1 ** 0.05 *** 0.01) b(%10.3f) t(%9.3f) compress nogap scalars("N" "r2_a") title("Ownership and Similarity") label mtitles


********************************************************************************Part 4: Cross-sectional Analysis***************

***************************************************************Sinful industry

gen OwnershipSin= Ownership*Sin

reghdfe lnCoverage Ownership OwnershipSin Sin $Controls, absorb (firm Year) vce(cluster firm)
estimates store sin1

reghdfe Sentiment1 Ownership OwnershipSin Sin $Controls, absorb (firm Year) vce(cluster firm)
estimates store sin2

reghdfe Sentiment2 Ownership OwnershipSin Sin $Controls, absorb(firm Year) vce(cluster firm)
estimates store sin3

esttab sin1 sin2 sin3,star(* 0.1 ** 0.05 *** 0.01) b(%10.3f) t(%9.3f) compress nogap scalars("N" "r2_a") title("Sinful Industry") label mtitles



***************************************************************Market Pessimistic

gen OwnershipPessimistic=Ownership*Pessimistic

reghdfe lnCoverage Ownership OwnershipPessimistic Pessimistic $Controls, absorb (firm Year) vce(cluster firm)
estimates store MPE1

reghdfe Sentiment1 Ownership OwnershipPessimistic Pessimistic $Controls, absorb (firm Year) vce(cluster firm)
estimates store MPE2

reghdfe Sentiment2 Ownership OwnershipPessimistic Pessimistic $Controls, absorb (firm Year) vce(cluster firm)
estimates store MPE3

esttab MPE1 MPE2 MPE3,star(* 0.1 ** 0.05 *** 0.01) b(%10.3f) t(%9.3f) compress nogap scalars("N" "r2_a") title("Market Pessimistic") label mtitles


********************************************************************************Part 5: Media ownership, media reports and firm value***************

gen inter1=lnCoverage*Ownership
gen inter2=Sentiment1*Ownership
gen inter3=Sentiment2*Ownership

reghdfe TQ Ownership Size Leverage Growth ROA CAPX Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE Institution, absorb (firm Year) vce (cluster firm)
est store t1

reghdfe TQ Ownership lnCoverage Size Leverage Growth ROA CAPX Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE Institution, absorb (firm Year) vce (cluster firm)
est store t2

reghdfe TQ Ownership inter1 lnCoverage Size Leverage Growth ROA CAPX Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE Institution, absorb (firm Year) vce (cluster firm)
est store t3

reghdfe TQ Ownership Sentiment1 Size Leverage Growth ROA CAPX Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE Institution, absorb (firm Year) vce (cluster firm)
est store t4

reghdfe TQ Ownership inter2 Sentiment1 Size Leverage Growth ROA CAPX Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE Institution, absorb (firm Year) vce (cluster firm)
est store t5

reghdfe TQ Ownership Sentiment2 Size Leverage Growth ROA CAPX Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE Institution, absorb (firm Year) vce (cluster firm)
est store t6

reghdfe TQ Ownership inter3 Sentiment2 Size Leverage Growth ROA CAPX Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE Institution, absorb (firm Year) vce (cluster firm)
est store t7

esttab t1 t2 t3 t4 t5 t6 t7,star(* 0.1 ** 0.05 *** 0.01) b(%10.3f) t(%9.3f) compress nogap scalars("N" "r2_a") title("Media ownership, media reports and firm value") label mtitles


********************************************************************************Part 6:  Impact of state ownership***************

************************************************State-controll vs. Market-oriented*****

reghdfe lnSCoverage Ownership $Controls, absorb (firm Year) vce(cluster firm)
estimates store SM1

reghdfe lnMCoverage Ownership $Controls, absorb (firm Year) vce(cluster firm)
estimates store SM2

reghdfe SSentiment1 Ownership $Controls, absorb (firm Year) vce(cluster firm)
estimates store SM3

reghdfe MSentiment1 Ownership $Controls, absorb (firm Year) vce(cluster firm)
estimates store SM4

reghdfe SSentiment2 Ownership $Controls, absorb (firm Year) vce(cluster firm)
estimates store SM5

reghdfe MSentiment2 Ownership $Controls, absorb (firm Year) vce(cluster firm)
estimates store SM6

esttab SM1 SM2 SM3 SM4 SM5 SM6,star(* 0.1 ** 0.05 *** 0.01) b(%10.3f) t(%9.3f) compress nogap scalars("N" "r2_a" "F") title("State-controlled vs. Market-oriented") label mtitles


************************************************Coefficient comparision

xtset firm Year

xtreg lnSCoverage Ownership Size Leverage BM Growth ROA Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE MP i.Year,fe
estimates store SM1a

xtreg lnMCoverage Ownership Size Leverage BM Growth ROA Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE MP i.Year,fe
estimates store SM2a

suest SM1a SM2a, cluster (firm)

test [SM1a_mean]Ownership=[SM2a_mean]Ownership


xtset firm Year
 
xtreg SSentiment1 Ownership Size Leverage BM Growth ROA Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE MP SOE MP i.Year, fe
estimates store SM3a

xtreg MSentiment1 Ownership Size Leverage BM Growth ROA Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE MP SOE MP i.Year, fe
estimates store SM4a

suest SM3a SM4a, cluster (firm)

test [SM3a_mean]Ownership=[SM4a_mean]Ownership


xtreg SSentiment2 Ownership Size Leverage BM Growth ROA Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE MP i.Year, fe
estimates store SM5a

xtreg MSentiment2 Ownership Size Leverage BM Growth ROA Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE MP i.Year, fe
estimates store SM6a

suest SM5a SM6a, cluster (firm)

test [SM5a_mean]Ownership=[SM6a_mean]Ownership



************************************************SOE vs. Non-SOE****************************

reghdfe lnCoverage Ownership $Controls if SOE==1, absorb(firm Year) vce(cluster firm)
estimates store SOE1

reghdfe lnCoverage Ownership $Controls if SOE==0, absorb(firm Year) vce(cluster firm)
estimates store SOE2

reghdfe Sentiment1 Ownership $Controls if SOE==1, absorb(firm Year) vce(cluster firm)
estimates store SOE3

reghdfe Sentiment1 Ownership $Controls MP if SOE==0, absorb(firm Year) vce(cluster firm)
estimates store SOE4

reghdfe Sentiment2 Ownership $Controls if SOE==1, absorb(firm Year) vce(cluster firm)
estimates store SOE5

reghdfe Sentiment2 Ownership $Controls if SOE==0, absorb(firm Year) vce(cluster firm)
estimates store SOE6

esttab SOE1 SOE2 SOE3 SOE4 SOE5 SOE6,star(* 0.1 ** 0.05 *** 0.01) b(%10.3f) t(%9.3f) compress nogap scalars("N" "r2_a" "F") title("SOE vs. Non-SOE") label mtitles


************************************************Coefficient comparision

xtset firm Year

xtreg lnCoverage Ownership Size Leverage BM Growth ROA Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE MP i.Year if SOE==1, fe
estimates store SOE1a

xtreg lnCoverage Ownership Size Leverage BM Growth ROA Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE MP i.Year if SOE==0, fe
estimates store SOE2a

suest SOE1a SOE2a, cluster (firm)

test [SOE1a_mean]Ownership=[SOE2a_mean]Ownership


xtreg Sentiment1 Ownership Size Leverage BM Growth ROA Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE MP i.Year if SOE==1, fe
estimates store SOE3a

xtreg Sentiment1 Ownership Size Leverage BM Growth ROA Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE MP i.Year if SOE==0, fe
estimates store SOE4a

suest SOE3a SOE4a, cluster (firm)

test [SOE3a_mean]Ownership=[SOE4a_mean]Ownership


xtreg Sentiment2 Ownership Size Leverage BM Growth ROA Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE MP i.Year if SOE==1, fe
estimates store SOE5a

xtreg Sentiment2 Ownership Size Leverage BM Growth ROA Momentum Idiosyncratic Dual Board Ind Top Block Zindex SOE MP i.Year if SOE==0, fe
estimates store SOE6a

suest SOE5a SOE6a, cluster (firm)

test [SOE5a_mean]Ownership=[SOE6a_mean]Ownership




********************************************************************************Part 7: Robustness Checks***************

***********************************************The impact of Advertisment

reghdfe lnCoverage Ownership Advertisement $Controls, absorb (firm Year) vce (cluster firm)
estimates store ad1

reghdfe Sentiment1 Ownership Advertisement $Controls , absorb (firm Year) vce (cluster firm)
estimates store ad2

reghdfe Sentiment2 Ownership Advertisement $Controls, absorb (firm Year) vce (cluster firm)
estimates store ad3

esttab ad1 ad2 ad3,star(* 0.1 ** 0.05 *** 0.01) b(%10.3f) t(%9.3f) compress nogap scalars("N" "r2_a" "F") title("The impact of Advertisment") label mtitles


***********************************************Entropy balancing matched sample regression

ebalance Ownership Size Idiosyncratic STD Leverage Growth BM ROA Top Block Zindex SOE MP i.Year i.indust, targets(3)

reghdfe lnCoverage Ownership $Controls [aweight= _webal], absorb (firm Year) vce(cluster firm)
estimates store EM1 

reghdfe Sentiment1 Ownership $Controls [aweight= _webal], absorb (firm Year) vce(cluster firm)
estimates store EM2

reghdfe Sentiment2 Ownership $Controls [aweight= _webal], absorb (firm Year) vce(cluster firm)
estimates store EM3

esttab EM1 EM2 EM3,star(* 0.1 ** 0.05 *** 0.01) b(%10.3f) t(%9.3f) compress nogap scalars("N" "r2_a" "F") title("Entropy Balancced Matching") label mtitles


***********************************************Alternative measure of tone of reporting
reghdfe Negative Ownership $Controls, absorb (firm Year) vce (cluster firm)
estimates store tone1

reghdfe Favor Ownership $Controls, absorb (firm Year) vce (cluster firm)
estimates store tone2

esttab tone1 tone2,star(* 0.1 ** 0.05 *** 0.01) b(%10.3f) t(%9.3f) compress nogap scalars("N" "r2" "r2_a" "F") title("Alternative measure of tone") label mtitles


***********************************************Alternative measure of media affiliation

************The number of media subsidiaries

reghdfe lnCoverage Ownership_num $Controls, absorb (firm Year) vce (cluster firm)
estimates store num1

reghdfe Sentiment1 Ownership_num $Controls, absorb (firm Year) vce (cluster firm)
estimates store num2

reghdfe Sentiment2 Ownership_num $Controls, absorb (firm Year) vce (cluster firm)
estimates store num3

esttab num1 num2 num3,star(* 0.1 ** 0.05 *** 0.01) b(%10.3f) t(%9.3f) compress nogap scalars("N" "r2" "r2_a" "F") title("The number of media subsidiaries and Media Sentiment") label mtitles


************The percentage of ownership

reghdfe lnCoverage Ownership_per $Controls, absorb (firm Year) vce (cluster firm)
estimates store per1

reghdfe Sentiment1 Ownership_per $Controls, absorb (firm Year) vce (cluster firm)
estimates store per2

reghdfe Sentiment2 Ownership_per $Controls, absorb (firm Year) vce (cluster firm)
estimates store per3

esttab per1 per2 per3,star(* 0.1 ** 0.05 *** 0.01) b(%10.3f) t(%9.3f) compress nogap scalars("N" "r2" "r2_a" "F") title("The percentage of ownership in media affiliation") label mtitles



***********************************************ITCV
reghdfe lnCoverage Ownership $Controls, absorb (firm Year) vce(cluster firm)
konfound Ownership, sig(.05) non_li(1)

reghdfe Sentiment1 Ownership $Controls, absorb (firm Year) vce(cluster firm)
konfound Ownership, sig(.05) non_li(1)

reghdfe Sentiment2 Ownership $Controls, absorb (firm Year) vce(cluster firm)
konfound Ownership, sig(.05) non_li(1)








